import 'package:flutter/material.dart';
import 'package:gradient_text/gradient_text.dart';

class GradientTextDemo extends StatelessWidget {
  const GradientTextDemo({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('GradientTextDemo'),
        ),
        body: Center(
          child: Container(
            width: double.infinity,
            child: GradientText(
              '施蒂利克赶紧类啥都开',
              gradient: LinearGradient(
                colors: [
                  Color.fromRGBO(0, 0, 0, 1),
                  Color.fromRGBO(214, 15, 164, 1)
                ],
                begin: Alignment.topCenter,
                end: Alignment.bottomCenter,
              ),
              textAlign: TextAlign.center,
              style: TextStyle(
                fontSize: 30.0,
              ),
            ),
          ),
        ));
  }
}
